import { useEffect, useState } from 'react'
import Goodlist from '../../components/goodlist/goolist'
import Listpage from '../../components/listpage/listpage'
import Slideshow from '../../components/slideshow/slideshow'
import {getGoodList} from '../../tools/Ajax'

function Home(){


    const [goodData,setGoodData] = useState([])
    useEffect(()=>{
        getGoodList().then(res=>{
            console.log(40,res.data);
            setGoodData(res.data.splice(0,100))
            console.log(41,res.data.splice(0,100));
        })
    },[])
    // console.log(goodData);
    return <div className='home'>
        <div className='bigvox'>
        <Goodlist></Goodlist>
        <Slideshow></Slideshow>
        <Listpage list={goodData}></Listpage>
        </div>
    </div>
}
export default Home